import 'package:finance_app/src/entities/coa_entity.dart';
import 'package:finance_app/src/entities/setting_data_entity.dart';

class JournalAccountAmount {
  CoaCoaAccountHeaderCoaAccountDetail account;
  SettingDataTax gst;
  bool isCheckInclusive;
  num amount;

  num get total {
    if (gst == null) return amount;
    double rateDouble = gst.rate / 100;
    if (isCheckInclusive == true) {
      return amount;
    } else {
      double result = amount + amount * rateDouble;
      return result;
    }
  }
}
